<?php
/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 2020/4/8
 * Time: 16:07
 */

namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use App\Model\UserLogs;
class Users extends Model
{

    protected $guarded = ['id'];
    public $table = 'users';
    public $timestamps = false;
    protected $connection = 'mysql';

    public function UserLogs()
    {
        return $this->hasMany('App\Model\UserLogs','user_id','id');//1.related -> 关联的模型，2.foreignKey->关联的字段，3.localKey->关联表的主键
    }
}
